12 Java Security > 12.1 Secure Data Transfer > 12.1.1 Create a Secure Data Transfer Environment Step by Step

12.1.1
The following steps describe the configuration:
•
•
The steps described below use the cygwin + openssl environment (for installation see http://www.cygwin.com/. The openssl documentation can be found here http://www.openssl.org/docs/apps/openssl.html)
A CA Root certificate is generated. This certificate can be placed on the HTTPS-Server. Another possibility is to use the private key of the certificate in order to sign thereby a server certificate. Both certificates form then a chain, which can be examined by the ME. A step-by-step description for the latter scenario can be found below.
1.
-
We need certificates with sha1 signature. Java Security supports a sha1 signature of the certificate only.
Add the parameter "-sha1" to the command "Making CA certificate ..." in the section of file CA.pl (cygwin location \cygwin\usr\ssl\misc”)
-
Create a shell (use location \cygwin\usr\ssl\misc)
-
>perl CA.pl –newca
 
-
Convert file format from PEM to DER
CA certificate cacert.pem
>openssl x509 -in ./demoCA/cacert.pem -inform PEM
-out ./demoCA/cacert.der -outform DER
CA private key file cakey.pem
>openssl pkcs8 -in ./demoCA/private/cakey.pem
 
2.
-
>keytool -genkey -alias server
  -sigalg SHA1withRSA -keyalg RSA
 
The field “name” of the certificate is the domain name or the IP address of the server.
3.
-
 
4.
-
 
-
>openssl x509 -in server.pem -inform PEM
 
5.
-
-
 
 
6.
-
-
 
-
 
7.
-
-
8.
Result:
-
-
-
-
-
Consult the documentation of your web server on how to set.up the certificate on it.